package at.fhj.itm11.forum.api;

import java.util.Date;
import java.util.List;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.inject.Named;

import at.fhj.itm11.forum.service.TopicService;
import at.fhj.itm11.forum.service.dtos.TopicDTO;
import at.fhj.itm11.forum.service.dtos.UserDTO;

@Stateless
@Remote(TopicService.class)
public class TopicServiceApi implements TopicService {

	@Inject
	@Named("topicServiceImpl")
	private TopicService service;
	
	@Override
	public TopicDTO findById(Long id) {
		return service.findById(id);
	}

	@Override
	public List<TopicDTO> retrieveAllTopicsOrderedByTitle() {
		return service.retrieveAllTopicsOrderedByTitle();
	}

	@Override
	public void register(TopicDTO topic, UserDTO author, Date date) {
		service.register(topic, author, date);
	}

}
